<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MDF Lib: include/mdf/iattachment.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="utillib.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">MDF Lib<span id="projectnumber">&#160;2.2</span>
   </div>
   <div id="projectbrief">Interface against MDF 3/4 files</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_dea88a92c3ac1d8c329848683c200b71.html">mdf</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="headertitle"><div class="title">iattachment.h</div></div>
</div><!--header-->
<div class="contents">
<a href="iattachment_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * Copyright 2021 Ingemar Hedvall</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> * SPDX-License-Identifier: MIT</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> */</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &lt;optional&gt;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#include &quot;<a class="code" href="iblock_8h.html">mdf/iblock.h</a>&quot;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#include &quot;<a class="code" href="imetadata_8h.html">mdf/imetadata.h</a>&quot;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemdf.html">mdf</a> {</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span> </div>
<div class="foldopen" id="foldopen00021" data-start="{" data-end="};">
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_attachment.html">   21</a></span><span class="keyword">class </span><a class="code hl_class" href="classmdf_1_1_i_attachment.html">IAttachment</a> : <span class="keyword">public</span> <a class="code hl_class" href="classmdf_1_1_i_block.html">IBlock</a> {</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_attachment.html#a07ee05f4fedf8f19b8db5f7e9a031b84">   23</a></span>  <span class="keyword">virtual</span> <a class="code hl_function" href="classmdf_1_1_i_attachment.html#a07ee05f4fedf8f19b8db5f7e9a031b84">~IAttachment</a>() <span class="keyword">override</span> = <span class="keywordflow">default</span>; </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_attachment.html#a09fbd2dd0a98d53c8fe459f3c9a8691c">   26</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_i_attachment.html#a09fbd2dd0a98d53c8fe459f3c9a8691c">CreatorIndex</a>(uint16_t creator) = 0;</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_attachment.html#a1ededb3278876bc03668cb6915dcab5a">   34</a></span>  [[nodiscard]] <span class="keyword">virtual</span> uint16_t <a class="code hl_function" href="classmdf_1_1_i_attachment.html#a1ededb3278876bc03668cb6915dcab5a">CreatorIndex</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_attachment.html#a373294d9709ae260bd76d52004344799">   37</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_i_attachment.html#a373294d9709ae260bd76d52004344799">IsEmbedded</a>(<span class="keywordtype">bool</span> embed) = 0; </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_attachment.html#a57a831c42b086a50a8080e3b67d785fa">   38</a></span>  [[nodiscard]] <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classmdf_1_1_i_attachment.html#a57a831c42b086a50a8080e3b67d785fa">IsEmbedded</a>() <span class="keyword">const</span> = 0; </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_attachment.html#af895e654fbcd9ce017a2798b2e2c8140">   40</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_i_attachment.html#af895e654fbcd9ce017a2798b2e2c8140">IsCompressed</a>(<span class="keywordtype">bool</span> compress) = 0; </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_attachment.html#a708bd563e961cc1970136b52e72c90a7">   41</a></span>  [[nodiscard]] <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classmdf_1_1_i_attachment.html#a708bd563e961cc1970136b52e72c90a7">IsCompressed</a>() <span class="keyword">const</span> = 0; </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_attachment.html#a91ba62b535ee07aac62501393b8a74e4">   48</a></span>  [[nodiscard]] <span class="keyword">virtual</span> std::optional&lt;std::string&gt; <a class="code hl_function" href="classmdf_1_1_i_attachment.html#a91ba62b535ee07aac62501393b8a74e4">Md5</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_attachment.html#a328c91140e2a29d1679eb032c01b2035">   56</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_i_attachment.html#a328c91140e2a29d1679eb032c01b2035">FileName</a>(<span class="keyword">const</span> std::string&amp; filename) = 0;</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_attachment.html#afe17d659c848c3178ba5b1b9c78e231e">   63</a></span>  [[nodiscard]] <span class="keyword">virtual</span> <span class="keyword">const</span> std::string&amp; <a class="code hl_function" href="classmdf_1_1_i_attachment.html#afe17d659c848c3178ba5b1b9c78e231e">FileName</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span> </div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_attachment.html#a86d85bdfc57299276ead7c353b4371cb">   70</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_i_attachment.html#a86d85bdfc57299276ead7c353b4371cb">FileType</a>(<span class="keyword">const</span> std::string&amp; file_type) = 0;</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_attachment.html#aa06265f57bc100358c376062263402e9">   77</a></span>  [[nodiscard]] <span class="keyword">virtual</span> <span class="keyword">const</span> std::string&amp; <a class="code hl_function" href="classmdf_1_1_i_attachment.html#aa06265f57bc100358c376062263402e9">FileType</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_attachment.html#aeed604d1cc15caf9df988ae8b53af6d6">   85</a></span>  [[nodiscard]] <span class="keyword">virtual</span> <a class="code hl_class" href="classmdf_1_1_i_meta_data.html">IMetaData</a>* <a class="code hl_function" href="classmdf_1_1_i_attachment.html#aeed604d1cc15caf9df988ae8b53af6d6">CreateMetaData</a>() = 0;</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_attachment.html#ac80584a458824a3caf0acf4fbe890969">   92</a></span>  [[nodiscard]] <span class="keyword">virtual</span> <a class="code hl_class" href="classmdf_1_1_i_meta_data.html">IMetaData</a>* <a class="code hl_function" href="classmdf_1_1_i_attachment.html#ac80584a458824a3caf0acf4fbe890969">MetaData</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span>};</div>
</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span> </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span>}  <span class="comment">// namespace mdf</span></div>
<div class="ttc" id="aclassmdf_1_1_i_attachment_html"><div class="ttname"><a href="classmdf_1_1_i_attachment.html">mdf::IAttachment</a></div><div class="ttdoc">Interface against an attached file.</div><div class="ttdef"><b>Definition</b> iattachment.h:21</div></div>
<div class="ttc" id="aclassmdf_1_1_i_attachment_html_a07ee05f4fedf8f19b8db5f7e9a031b84"><div class="ttname"><a href="classmdf_1_1_i_attachment.html#a07ee05f4fedf8f19b8db5f7e9a031b84">mdf::IAttachment::~IAttachment</a></div><div class="ttdeci">virtual ~IAttachment() override=default</div><div class="ttdoc">Default destructor.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_attachment_html_a09fbd2dd0a98d53c8fe459f3c9a8691c"><div class="ttname"><a href="classmdf_1_1_i_attachment.html#a09fbd2dd0a98d53c8fe459f3c9a8691c">mdf::IAttachment::CreatorIndex</a></div><div class="ttdeci">virtual void CreatorIndex(uint16_t creator)=0</div><div class="ttdoc">Sets the Creator index.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_attachment_html_a1ededb3278876bc03668cb6915dcab5a"><div class="ttname"><a href="classmdf_1_1_i_attachment.html#a1ededb3278876bc03668cb6915dcab5a">mdf::IAttachment::CreatorIndex</a></div><div class="ttdeci">virtual uint16_t CreatorIndex() const =0</div><div class="ttdoc">Returns the creator index.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_attachment_html_a328c91140e2a29d1679eb032c01b2035"><div class="ttname"><a href="classmdf_1_1_i_attachment.html#a328c91140e2a29d1679eb032c01b2035">mdf::IAttachment::FileName</a></div><div class="ttdeci">virtual void FileName(const std::string &amp;filename)=0</div><div class="ttdoc">Sets the filename. Include path.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_attachment_html_a373294d9709ae260bd76d52004344799"><div class="ttname"><a href="classmdf_1_1_i_attachment.html#a373294d9709ae260bd76d52004344799">mdf::IAttachment::IsEmbedded</a></div><div class="ttdeci">virtual void IsEmbedded(bool embed)=0</div><div class="ttdoc">Set true if embedded.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_attachment_html_a57a831c42b086a50a8080e3b67d785fa"><div class="ttname"><a href="classmdf_1_1_i_attachment.html#a57a831c42b086a50a8080e3b67d785fa">mdf::IAttachment::IsEmbedded</a></div><div class="ttdeci">virtual bool IsEmbedded() const =0</div><div class="ttdoc">True if embedded.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_attachment_html_a708bd563e961cc1970136b52e72c90a7"><div class="ttname"><a href="classmdf_1_1_i_attachment.html#a708bd563e961cc1970136b52e72c90a7">mdf::IAttachment::IsCompressed</a></div><div class="ttdeci">virtual bool IsCompressed() const =0</div><div class="ttdoc">True if compressed.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_attachment_html_a86d85bdfc57299276ead7c353b4371cb"><div class="ttname"><a href="classmdf_1_1_i_attachment.html#a86d85bdfc57299276ead7c353b4371cb">mdf::IAttachment::FileType</a></div><div class="ttdeci">virtual void FileType(const std::string &amp;file_type)=0</div><div class="ttdoc">Sets the MIME type of the file.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_attachment_html_a91ba62b535ee07aac62501393b8a74e4"><div class="ttname"><a href="classmdf_1_1_i_attachment.html#a91ba62b535ee07aac62501393b8a74e4">mdf::IAttachment::Md5</a></div><div class="ttdeci">virtual std::optional&lt; std::string &gt; Md5() const =0</div><div class="ttdoc">Return the MDG checksum if it exist.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_attachment_html_aa06265f57bc100358c376062263402e9"><div class="ttname"><a href="classmdf_1_1_i_attachment.html#aa06265f57bc100358c376062263402e9">mdf::IAttachment::FileType</a></div><div class="ttdeci">virtual const std::string &amp; FileType() const =0</div><div class="ttdoc">Returns the MIME type of the string.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_attachment_html_ac80584a458824a3caf0acf4fbe890969"><div class="ttname"><a href="classmdf_1_1_i_attachment.html#ac80584a458824a3caf0acf4fbe890969">mdf::IAttachment::MetaData</a></div><div class="ttdeci">virtual IMetaData * MetaData() const =0</div><div class="ttdoc">Returns the meta-data (MD) block.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_attachment_html_aeed604d1cc15caf9df988ae8b53af6d6"><div class="ttname"><a href="classmdf_1_1_i_attachment.html#aeed604d1cc15caf9df988ae8b53af6d6">mdf::IAttachment::CreateMetaData</a></div><div class="ttdeci">virtual IMetaData * CreateMetaData()=0</div><div class="ttdoc">Create a meta-data (MD) block.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_attachment_html_af895e654fbcd9ce017a2798b2e2c8140"><div class="ttname"><a href="classmdf_1_1_i_attachment.html#af895e654fbcd9ce017a2798b2e2c8140">mdf::IAttachment::IsCompressed</a></div><div class="ttdeci">virtual void IsCompressed(bool compress)=0</div><div class="ttdoc">Set true tp compress.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_attachment_html_afe17d659c848c3178ba5b1b9c78e231e"><div class="ttname"><a href="classmdf_1_1_i_attachment.html#afe17d659c848c3178ba5b1b9c78e231e">mdf::IAttachment::FileName</a></div><div class="ttdeci">virtual const std::string &amp; FileName() const =0</div><div class="ttdoc">Returns the filename.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_block_html"><div class="ttname"><a href="classmdf_1_1_i_block.html">mdf::IBlock</a></div><div class="ttdoc">Base class for all MDF blocks.</div><div class="ttdef"><b>Definition</b> iblock.h:19</div></div>
<div class="ttc" id="aclassmdf_1_1_i_meta_data_html"><div class="ttname"><a href="classmdf_1_1_i_meta_data.html">mdf::IMetaData</a></div><div class="ttdoc">Interface against an meta data block (MD) in a MDF4 file.</div><div class="ttdef"><b>Definition</b> imetadata.h:27</div></div>
<div class="ttc" id="aiblock_8h_html"><div class="ttname"><a href="iblock_8h.html">iblock.h</a></div><div class="ttdoc">All MDF blocks inherits from the IBlock class. The interface class is used internally in lists....</div></div>
<div class="ttc" id="aimetadata_8h_html"><div class="ttname"><a href="imetadata_8h.html">imetadata.h</a></div></div>
<div class="ttc" id="anamespacemdf_html"><div class="ttname"><a href="namespacemdf.html">mdf</a></div><div class="ttdoc">Main namespace for the MDF library.</div><div class="ttdef"><b>Definition</b> canmessage.h:17</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
